/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vn.edu.iuh.dhth7dlt.emailclient.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JFrame;
import javax.swing.JOptionPane;


/**
 *
 * @author Administrator
 */
public class CheckInput {
    private Pattern pattern;
    private Matcher matcher;

    public CheckInput(String ss) {
            pattern = Pattern.compile(ss);
    }
    public boolean validate(final String hex) {
            matcher = pattern.matcher(hex);
            return matcher.matches();
    }
    //Show Message dialog
    public void showMessenger(String mess){
        JFrame frame=new JFrame("jThongBao");
        JOptionPane.showMessageDialog(frame, mess);
    }
}